package com.javaHigest.Reflect_;

public class TestClass {
    public static void main(String[] args) throws Exception {
        //获取类对象一
        Class c1= Student.class;
        System.out.println(c1.getName());
        System.out.println(c1.getSimpleName());
        //获取类对象二
        Class c2=Class.forName("com.javaHigest.Reflect_.Student");//会出现异常，怕路径不对；
        System.out.println(c1==c2);
        //获取对象三
        Student s=new Student();
        Class c3=s.getClass();
        System.out.println(c3==c1);
    }
}
